trying to build a function to get course information according to choice