added try except