updated grader and checks for more robust handling