adding checks and grader.js modifications