addded checks and grader code