Updated Exception. Updated While-loop