refactor collision stuff