adding guard around gathering data
better tracking and display of selected bar index