working on flux_near method