added shuffle and reordering