refactoring clever shit