Branch utility function