adding statistics to produce graphs