branching and union works