refactored exceptions