added gradeForm method and used it to implement grading in the doPost method of the controller.