add try catch
added try catch