refine query in course model refs #20