moved more code to course class