selectSquareWithLeastValues done