modify the square collision for proper working