pass courseid rather than whole object