Function getPathTerms