Is this println for debugging only, or it's needed by the algorithm?