refactoring to throw exception