function transfer(address _to, uint _value, bytes _data) public {
        
        require(balances[msg.sender] >= _value);

        if(_to == address(this)) {
            if(swap == false) {
                
                
                totalSupply = add(totalSupply, _value);
                circulatingSupply = sub(circulatingSupply, _value);
                if(circulatingSupply == 0) allSwapped = true;
                tierTokens[maxTier] = add(tierTokens[maxTier], _value);
                balances[msg.sender] = sub(balanceOf(msg.sender), _value);
                Transfer(msg.sender, _to, _value);
            }
            else {
                require(div(_value, 1 ether) > 0);   
                if(distributionCalculated = false) {
                    calculateHeldTokenDistribution();
                }
                balances[msg.sender] = sub(balances[msg.sender], _value);
                shareStoredTokens(msg.sender, div(_value, 1 ether));
            }
        }
        else {
            
            
            balances[msg.sender] = sub(balanceOf(msg.sender), _value);
            balances[_to] = add(balances[_to], _value);

            Transfer(msg.sender, _to, _value);
        }
    }