added branching and merging references