use catch for exception handling