Added bar graph function