function _releasableAmount(uint256 i, uint256 nextStage) private view returns (uint256) {
    uint256 cliff = _plans[i].released;
    if(nextStage < _plans[i].stages) {
      
      if(_plans[i].releaseRatio == 0) {
        uint256 amountPerStage = _plans[i].managedAmount.div(_plans[i].stages);
        cliff = nextStage.mul(amountPerStage);
      }
      
      else {
        cliff = 0;
        
        for(uint j = 0; j < nextStage; j++) {
          uint256 remained = _plans[i].managedAmount.sub(cliff);
          cliff = cliff.add(remained.div(_plans[i].releaseRatio));
        }
      }
    }
    
    else {
      cliff = _plans[i].managedAmount;    
    }
    return cliff.sub(_plans[i].released);
  }