added switch statement to grade.js