nice refactoring