function vestedAmount(address _recipient) public view returns (uint256) {
    if( block.timestamp < beneficiaries[_recipient].cliff ) {
      return 0;
    }else if( block.timestamp >= add( beneficiaries[_recipient].cliff, (30 days)*beneficiaries[_recipient].periods ) ) {
      return beneficiaries[_recipient].totalAllocated;
    }else {
      for(uint i = 0; i < beneficiaries[_recipient].periods; i++) {
        if( block.timestamp >= add( beneficiaries[_recipient].cliff, (30 days)*i ) && block.timestamp < add( beneficiaries[_recipient].cliff, (30 days)*(i+1) ) ) {
          return div( mul(i, beneficiaries[_recipient].totalAllocated), beneficiaries[_recipient].periods );
        }
      }
    }
  }