Wrote code to create bar chart