add try catch for exceptions' handling