Add parsing for term function