make the plot_statistics script a bit more readable