Update reorder() to use indexes