finished local branch functions