working version of grader.js