# \[issue\] Error down casting NFT from NonFungibleToken

**URL:** <https://forum.flow.com/t/issue-error-down-casting-nft-from-nonfungibletoken/3515>\
**Category:** New To Flow\
**Tags:** collection, cadence\
**Created:** [August 24, 2022, 2:31pm UTC](https://forum.flow.com/t/issue-error-down-casting-nft-from-nonfungibletoken/3515 "2022-08-24T14:31:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alejandro](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@alejandro](https://forum.flow.com/u/alejandro)\
**Post date:** [August 24, 2022, 2:31pm UTC](https://forum.flow.com/t/issue-error-down-casting-nft-from-nonfungibletoken/3515/1 "2022-08-24T14:31:21Z")

</div>

Hi guys, I’ve created a NFT contract using this ExampleNFT.cdc as a reference. [https://github.com/onflow/flow-nft/blob/master/contracts/ExampleNFT.cdc](https://github.com/onflow/flow-nft/blob/master/contracts/ExampleNFT.cdc)  
my contract: [https://testnet.flowscan.org/contract/A.10389afd0d4ac851.InfiniteNFTV2](https://testnet.flowscan.org/contract/A.10389afd0d4ac851.InfiniteNFTV2)

When I use the **borrow** method (borrowExampleNFT in ExampleNFT contract)  
pub fun borrow(id: UInt64): &NFT? {  
if self.ownedNFTs[id] != nil {  
let ref = (&self.ownedNFTs[id] as auth &NonFungibleToken.NFT?)  
return ref as! &NFT  
}  
return nil  
}  
I receive the following error message  
error: unexpectedly found non-`&InfiniteNFTV2.NFT` while force-casting value  
 → 10389afd0d4ac851.InfiniteNFTV2:102:23  
|  
102 | return ref as! &NFT  
You guys have any idea about this meesage? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![alejandro](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@alejandro](https://forum.flow.com/u/alejandro)\
**Post date:** [August 24, 2022, 4:56pm UTC](https://forum.flow.com/t/issue-error-down-casting-nft-from-nonfungibletoken/3515/2 "2022-08-24T16:56:04Z")

</div>

Solved! just replacing the references from &NFT to &InfiniteNFTV2.NFT

```
pub fun borrow(id: UInt64): &InfiniteNFTV2.NFT? {
        let ref = (&self.ownedNFTs[id] as auth &NonFungibleToken.NFT?)!
        return ref as! &InfiniteNFTV2.NFT
    }
```
