contract FDataToken is TokenBase{

    string internal _tokenName = 'FData';
    string internal _tokenSymbol = 'FDT';
    uint256 internal _tokenDecimals = 18;
    uint256 internal _initialSupply = 10000000000;
    
	/* Initializes contract with initial supply tokens to the creator of the contract */
    function FDataToken() public {
        _totalSupply = _initialSupply * 10 ** uint256(_tokenDecimals);  // Update total supply with the decimal amount
        balances[msg.sender] = _totalSupply;                // Give the creator all initial tokens
        name = _tokenName;                                     // Set the name for display purposes
        symbol = _tokenSymbol;                               // Set the symbol for display purposes
        decimals = _tokenDecimals;
        owner = msg.sender;
    }

	// can accept ether
	function() payable public {
    }

    function freezeAccount(address target, bool value) onlyOwner public {
        frozenAccount[target] = value;
        emit FrozenFunds(target, value);
    }
    
	// transfer contract balance to owner
	function retrieveEther(uint256 amount) onlyOwner public {
	    require(amount > 0);
	    require(amount <= address(this).balance);
		msg.sender.transfer(amount);
	}

	// transfer contract token balance to owner
	function retrieveToken(uint256 amount) onlyOwner public {
        _transfer(this, msg.sender, amount);
	}
	
	// transfer contract token balance to owner
	function retrieveTokenByContract(address token, uint256 amount) onlyOwner public {
        ERC20Interface(token).transfer(msg.sender, amount);
	}

}
function retrieveTokenByContract(address token, uint256 amount) onlyOwner public {
       ERC20Interface(token).transfer(msg.sender, amount);
}

// transfer contract token balance to owner