implemented merging of branches.