function getInvestorPlanLimitsByUID(uint256 _uid, uint256 _planId) public view returns (uint256, uint256, uint256) {
        if (msg.sender != owner) {
            require(address2UID[msg.sender] == _uid, "only owner or self can check the investor info.");
        }
        require(_planId >= 0 && _planId < investmentPlans_.length, "Wrong investment plan id");

        Objects.Investor storage investor = uid2Investor[_uid];
        Objects.Plan storage plan = investmentPlans_[_planId];
        uint256 totalInvestment = 0;
        uint256 leftInvestmentLimit = 0;
        if (plan.limit != 0) {
            for (uint256 i = 0; i < investor.planCount; i++) {
                require(investor.plans[i].investmentDate != 0, "wrong investment date");
                if (investor.plans[i].planId != _planId || investor.plans[i].investmentDate < plan.lastUpdateDate) {
                    continue;
                }
                totalInvestment = totalInvestment.add(investor.plans[i].investment);
            }
            leftInvestmentLimit = (totalInvestment > plan.perInvestorLimit) ? 0 : plan.perInvestorLimit.sub(totalInvestment);
        }

        return
        (
        plan.limit,
        plan.leftAmount,
        leftInvestmentLimit
        );
    }