modified barchart.py