collision detection improvement