function getState() public constant returns (State) {
        if (address(pricingStrategy) == 0)
            return State.Preparing;
        else if (block.timestamp < startsAt)
            return State.PreFunding;
        else if (block.timestamp <= endsAt && !isPresaleFull())
            return State.Funding;
        else if (isMinimumGoalReached())
            return State.Success;
        else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised)
            return State.Refunding;
        else
            return State.Failure;
    }