Barrier implemented
Added barrier