Handle one and two branch with one algorithm