Moved loop over from to z_stat