test branch function