getting the correct branch