do more refactor for course.