DIAG: improve function naming and return value in kdSquares