collision refactoring