change to catch Exceptions