modify wp_distance