refactor collision.