function refund()
    public
    onlyFailedPreSale
    onlyAcceptedApplication(msg.sender)
    {
        applications[msg.sender].state = ApplicationState.Refunded;
        msg.sender.transfer(applications[msg.sender].contribution);
        Refund(msg.sender, applications[msg.sender].contribution);
    }