add minDistance comments