add distance calculation
add distance calculation