refactored collision