working in try catch