moved data_barrier to separate file