Implement collision detection part I