remove use of exceptions