nextgrade if wrong implemented and some cleanup for grade