change some variable name. add path2distance, trace2distance function prototype
add path2distance function