function tokenFallback(address _from, uint _value, bytes _data) public {
        require(_from == tx.origin);
        require(msg.sender == mainContract);
        require(isOpen);

        address oldowner;
        
        if(uint8(_data[0]) == 1){
            withdraw(1);
            require(card1.price == _value);
            card1.price = _value.mul(2);
            oldowner = card1.owner;
            card1.owner = _from;            
            
            ChickenParkCoin.transfer(oldowner, _value.mul(80) / 100);
        } else if(uint8(_data[0]) == 2){
            withdraw(2);
            require(card2.price == _value);
            card2.price = _value.mul(2);
            oldowner = card2.owner;
            card2.owner = _from;            
            
            ChickenParkCoin.transfer(oldowner, _value.mul(80) / 100);
        } else if(uint8(_data[0]) == 3){
            withdraw(3);
            require(card3.price == _value);
            card3.price = _value.mul(2);
            oldowner = card3.owner;
            card3.owner = _from;            

            ChickenParkCoin.transfer(oldowner, _value.mul(80) / 100);
        }
    }