Added collision detection to box