implement branch