refactoring exception handling