throwing an exception fixed