fix partial, add branching