function vestedAmount(address beneficiary) public view returns (uint256) {

        uint256 investmentIndex = investorLUT[beneficiary];

        uint256 vested = 0;

        if (block.timestamp >= start) {
            
            vested = investments[investmentIndex].totalBalance.div(3);
        }
        if (block.timestamp >= cliff && block.timestamp < end) {
            
            uint256 p1 = investments[investmentIndex].totalBalance.div(3);
            uint256 p2 = investments[investmentIndex].totalBalance;

            
            uint256 d_token = p2.sub(p1);
            uint256 time = block.timestamp.sub(cliff);
            uint256 d_time = end.sub(cliff);

            vested = vested.add(d_token.mul(time).div(d_time));
        }
        if (block.timestamp >= end) {
            
            vested = investments[investmentIndex].totalBalance;
        }
        return vested;
    }