updated Courses.java to read from db