add examples for barrier