Added grade validation
enhanced grade validation, added error dialog