minor changes to reordering