adding try exception