try to enhance performance for at least get_courses() query