creating server-side code for course list