working verision of grader.js