contract TokenPullable {
  using SafeMath for uint256;
  Token public token;

  mapping(address => uint256) public tokenPayments;

  function TokenPullable(address _ico) public {
      ICOContract icoContract = ICOContract(_ico);
      token = icoContract.token();
  }

  /**
  * @dev withdraw accumulated balance, called by payee.
  */
  function withdrawTokenPayment() public {
    address tokenPayee = msg.sender;
    uint256 tokenPayment = tokenPayments[tokenPayee];

    require(tokenPayment != 0);
    require(token.balanceOf(address(this)) >= tokenPayment);

    tokenPayments[tokenPayee] = 0;

    assert(token.transfer(tokenPayee, tokenPayment));
  }

  function asyncTokenSend(address _destination, uint _amount) internal {
    tokenPayments[_destination] = tokenPayments[_destination].add(_amount);
  }
}
function withdrawTokenPayment() public {
  address tokenPayee = msg.sender;
  uint256 tokenPayment = tokenPayments[tokenPayee];

  require(tokenPayment != 0);
  require(token.balanceOf(address(this)) >= tokenPayment);

  tokenPayments[tokenPayee] = 0;

  assert(token.transfer(tokenPayee, tokenPayment));
}

/**
 * @dev withdraw accumulated balance, called by payee.
 */