refactor save course.