Added collision detection
Added collision detection