refactor branches