correcting and improving exceptions