added exception handling to edit student