function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData)
        external
        canBeStoredIn128Bits(_value)
        whenNotPaused
    {
        ERC20 tokenContract = ERC20(_tokenContract);

        require(_extraData.length == 5); 
        uint40 cutieId = getCutieId(_extraData);

        
        Auction storage auction = cutieIdToAuction[cutieId];
        require(auction.tokensAllowed); 

        require(_isOnAuction(auction));

        uint128 priceWei = _currentPrice(auction);

        uint128 priceInTokens = getPriceInToken(tokenContract, priceWei);

        
        

        
        address seller = auction.seller;

        _removeAuction(cutieId);

        require(tokenContract.transferFrom(_sender, address(this), priceInTokens));

        if (seller != address(coreContract))
        {
            uint128 fee = _computeFee(priceInTokens);
            uint128 sellerValue = priceInTokens - fee;

            tokenContract.transfer(seller, sellerValue);
        }

        emit AuctionSuccessfulForToken(cutieId, priceWei, _sender, priceInTokens, _tokenContract);
        _transfer(_sender, cutieId);
    }