updated to work with tokenId