3rd commit - main changes for catching exceptions