add validation to CourseModel
fix namespace issue