sort banch by their ids