replacing branch