Added grade functionality.