updated bar index with distances