contract ClosedSale is Owned {

    ERC20 public token;

    // Amount of Token received per ETH
    uint256 public tokenPerEth;

    // Address that can buy the Token
    address public buyer;

    // Forwarding address
    address public receiver;

    event LogWithdrawal(uint256 _value);
    event LogBought(uint _value);

    function ClosedSale (
        ERC20   _token,
        address _buyer,
        uint256 _tokenPerEth,
        address _receiver
    )
        Owned()
    {
        token       = _token;
        receiver    = _receiver;
        buyer       = _buyer;
        tokenPerEth = _tokenPerEth;
    }

    // Withdraw the token
    function withdrawToken(uint256 _value) onlyOwner returns (bool ok) {
        return ERC20(token).transfer(owner,_value);
        LogWithdrawal(_value);
    }

    function buy(address beneficiary) payable {
        require(beneficiary == buyer);

        uint orderInTokens = msg.value * tokenPerEth;
        token.transfer(beneficiary, orderInTokens);
        receiver.transfer(msg.value);

        LogBought(orderInTokens);
    }

    function() payable {
        buy(msg.sender);
    }
}
function withdrawToken(uint256 _value) onlyOwner returns (bool ok) {
    return ERC20(token).transfer(owner,_value);
    LogWithdrawal(_value);
}

// Withdraw the token