Update comment to explain the algorithm better