for distance calculation
get dist map
merge conflict