eliminating use of try/except