fix to plot_stat to work on mac
remove copies of plot_stat