added try/catch