added database methods, fixed typo and type mismatch in Course class