first pass on branching