    function invest() payable public returns(bool){
        ieoState = getCurrentState();
        require(ieoState == State.running);
        require(msg.value >= minInvestment && msg.value <= maxInvestment);
        uint tokens = msg.value / tokenPrice;
        require(raisedAmount + msg.value <= hardCap);
        raisedAmount += msg.value;
        balances[msg.sender] += tokens;
        balances[founder] -= tokens;
        deposit.transfer(msg.value); 
        emit Invest(msg.sender, msg.value, tokens);
        return true;
    }