added flips and mean_vals