updated try/catch blocks