sorting branch