added while loop to ensure re-entry of student during editing