grading tests and bug fixes