reorder command line arguments