Reordering vertices