working on phase2 distance_field