getTerms function

Utility Function for RRPP