collision handling
refactor