made the bar widths variable to the amount of data