Added grade functionality