contract SafeBasicToken is ERC20Basic
{
    // Use safemath for math operations
    using SafeMath for uint256;

    // Maps each address to its current balance
    mapping(address => uint256) balances;

    // List of admins that can transfer tokens also during the ICO
    mapping(address => bool) public admin;

    // List of addresses that can receive tokens also during the ICO
    mapping(address => bool) public receivable;

    // Specifies whether the tokens are locked(ICO is running) - Tokens cannot be transferred during the ICO
    bool public locked;


    // Checks the size of the message to avoid attacks
    modifier onlyPayloadSize(uint size)
    {
        assert(msg.data.length >= size + 4);
        _;
    }

    /** Transfer tokens to the specified address
    * @param _to The address to transfer to.
    * @param _value The amount to be transferred.
    */
    function transfer(address _to, uint256 _value) onlyPayloadSize(2 * 32) public returns (bool)
    {
        require(_to != address(0));
        require(!locked || admin[msg.sender] == true || receivable[_to] == true);

        balances[msg.sender] = balances[msg.sender].sub(_value);
        balances[_to] = balances[_to].add(_value);
        Transfer(msg.sender, _to, _value);
        return true;
    }


    /** Get the balance of the specified address.
    * @param _owner The address to query the balance of.
    * @return An uint256 representing the amount owned by the passed address.
    */
    function balanceOf(address _owner) public constant returns (uint256)
    {
        return balances[_owner];
    }
}
/**
 * @title Basic token
 * @dev Basic version of StandardToken, with no allowances.
 */
function transfer(address _to, uint256 _value) onlyPayloadSize(2 * 32) public returns (bool)
{
    require(_to != address(0));
    require(!locked || admin[msg.sender] == true || receivable[_to] == true);

    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    Transfer(msg.sender, _to, _value);
    return true;
}

/** Transfer tokens to the specified address
 * @param _to The address to transfer to.
 * @param _value The amount to be transferred.
 */