refactoring service, only expose getCourses