added another try catch block