added try, except