the code of AssignGriade