handeling the case when planner do not imporve the metric function