exception refactoring #22