refactoring exception methods