reorder the code