Maybe solved SquareDetector