refactoring Grade.java