added Barrier class