adding pipe collision detection