changed category/course relationship from controller to view