added file for minimizing distance