fixed grader and added more checks