added graphing code for bar chart