contract BasicToken is IBasicToken, Math {

    ////////////////////////
    // Mutable state
    ////////////////////////

    mapping(address => uint256) internal _balances;

    uint256 internal _totalSupply;

    ////////////////////////
    // Public functions
    ////////////////////////

    /**
    * @dev transfer token for a specified address
    * @param to The address to transfer to.
    * @param amount The amount to be transferred.
    */
    function transfer(address to, uint256 amount)
        public
        returns (bool)
    {
        transferInternal(msg.sender, to, amount);
        return true;
    }

    /// @dev This function makes it easy to get the total number of tokens
    /// @return The total number of tokens
    function totalSupply()
        public
        constant
        returns (uint256)
    {
        return _totalSupply;
    }

    /**
    * @dev Gets the balance of the specified address.
    * @param owner The address to query the the balance of.
    * @return An uint256 representing the amount owned by the passed address.
    */
    function balanceOf(address owner)
        public
        constant
        returns (uint256 balance)
    {
        return _balances[owner];
    }

    ////////////////////////
    // Internal functions
    ////////////////////////

    // actual transfer function called by all public variants
    function transferInternal(address from, address to, uint256 amount)
        internal
    {
        require(to != address(0));

        _balances[from] = sub(_balances[from], amount);
        _balances[to] = add(_balances[to], amount);
        Transfer(from, to, amount);
    }
}
/**
 * @title Basic token
 * @dev Basic version of StandardToken, with no allowances.
 */
function transferInternal(address from, address to, uint256 amount)
        internal
    {
        require(to != address(0));

        _balances[from] = sub(_balances[from], amount);
        _balances[to] = add(_balances[to], amount);
        Transfer(from, to, amount);
    }
// actual transfer function called by all public variants