added induction of functions if exceptions are thrown