wrote functions to get data and sort data from online course catalog