separate refreshCourseList into new function