try catch added