contract AlohaNFT is ERC721, Ownable {
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIds;

    mapping (uint256 => uint256) private _tokenImages;
    mapping (uint256 => uint256) private _tokenRarities;
    mapping (uint256 => uint256) private _tokenBackgrounds;

    constructor(
        string memory name,
        string memory symbol,
        string memory baseURI
    ) public ERC721(name, symbol) {
        _setBaseURI(baseURI);
    }

    /**
    * @dev Mints a new ALOHA NFT for a wallet.
    */
    function awardItem(
        address wallet,
        uint256 tokenImage,
        uint256 tokenRarity,
        uint256 tokenBackground
    )
        public
        onlyOwner()
        returns (uint256)
    {
        _tokenIds.increment();

        uint256 newItemId = _tokenIds.current();
        _mint(wallet, newItemId);
        _setTokenImage(newItemId, tokenImage);
        _setTokenRarity(newItemId, tokenRarity);
        _setTokenBackground(newItemId, tokenBackground);

        return newItemId;
    }

    function _setTokenImage(uint256 tokenId, uint256 _tokenImage) internal virtual {
        require(_exists(tokenId), "ERC721Metadata: Image set of nonexistent token");
        _tokenImages[tokenId] = _tokenImage;
    }

    function _setTokenRarity(uint256 tokenId, uint256 _tokenRarity) internal virtual {
        require(_exists(tokenId), "ERC721Metadata: Rarity set of nonexistent token");
        _tokenRarities[tokenId] = _tokenRarity;
    }

    function _setTokenBackground(uint256 tokenId, uint256 _tokenBackground) internal virtual {
        require(_exists(tokenId), "ERC721Metadata: Background set of nonexistent token");
        _tokenBackgrounds[tokenId] = _tokenBackground;
    }

    function tokenImage(uint256 tokenId) public view returns (uint256) {
        require(_exists(tokenId), "ERC721Metadata: Image query for nonexistent token");
        return _tokenImages[tokenId];
    }

    function tokenRarity(uint256 tokenId) public view returns (uint256) {
        require(_exists(tokenId), "ERC721Metadata: Rarity query for nonexistent token");
        return _tokenRarities[tokenId];
    }

    function tokenBackground(uint256 tokenId) public view returns (uint256) {
        require(_exists(tokenId), "ERC721Metadata: Background query for nonexistent token");
        return _tokenBackgrounds[tokenId];
    }
}
function awardItem(
    address wallet,
    uint256 tokenImage,
    uint256 tokenRarity,
    uint256 tokenBackground
)
    public
    onlyOwner()
    returns (uint256)
{
    _tokenIds.increment();

    uint256 newItemId = _tokenIds.current();
    _mint(wallet, newItemId);
    _setTokenImage(newItemId, tokenImage);
    _setTokenRarity(newItemId, tokenRarity);
    _setTokenBackground(newItemId, tokenBackground);

    return newItemId;
}

/**
 * @dev Mints a new ALOHA NFT for a wallet.
 */