adding trycatch