refactoring GradesActivity