function fund() public payable returns (bool){
        uint investment = 0;
        uint tokenCount = 0;
        while ((msg.value-investment) >= buy_value()) {
            investment += buy_value();
            totalSupply += 1;
            tokenCount++;
        }
        
        update_prices();
        balances[msg.sender] += tokenCount;
        Issuance(msg.sender, tokenCount);
        
        if (msg.value > investment) {
            msg.sender.transfer(msg.value - investment);
        }
        return true;
    }