Extracted bar graph into its own method