with the vs 2013, and add minDistance