using try catch