added calculation/plotting of mean