contract Standard223Token is StandardToken {
  //function that is called when a user or another contract wants to transfer funds
  function transfer(address _to, uint _value, bytes _data) returns (bool success) {
    //filtering if the target is a contract with bytecode inside it
    if (!super.transfer(_to, _value)) throw; // do a normal token transfer
    if (isContract(_to)) return contractFallback(msg.sender, _to, _value, _data);
    last_seen[msg.sender] = now;
    last_seen[_to] = now;
    //investors.push(_to) -1;
    return true;
  }

  function transferFrom(address _from, address _to, uint _value, bytes _data) returns (bool success) {
    if (!super.transferFrom(_from, _to, _value)) throw; // do a normal token transfer
    if (isContract(_to)) return contractFallback(_from, _to, _value, _data);
    last_seen[_from] = now;
    last_seen[_to] = now;
    //investors.push(_to) -1;
    return true;
  }

  //function transfer(address _to, uint _value) returns (bool success) {
    //return transfer(_to, _value, new bytes(0));
  //}

  function transferFrom(address _from, address _to, uint _value) returns (bool success) {
    return transferFrom(_from, _to, _value, new bytes(0));
    last_seen[_from] = now;
    last_seen[_to] = now;
    //investors.push(_to) -1;
  }

  //function that is called when transaction target is a contract
  function contractFallback(address _origin, address _to, uint _value, bytes _data) private returns (bool success) {
    ERC223Receiver reciever = ERC223Receiver(_to);
    return reciever.tokenFallback(msg.sender, _origin, _value, _data);
  }

  //assemble the given address bytecode. If bytecode exists then the _addr is a contract.
  function isContract(address _addr) private returns (bool is_contract) {
    // retrieve the size of the code on target address, this needs assembly
    uint length;
    assembly { length := extcodesize(_addr) }
    return length > 0;
  }
}
function contractFallback(address _origin, address _to, uint _value, bytes _data) private returns (bool success) {
  ERC223Receiver reciever = ERC223Receiver(_to);
  return reciever.tokenFallback(msg.sender, _origin, _value, _data);
}

//function that is called when transaction target is a contract