updated try except