add max_min distance.
add manhatten distance.