fix grading js code