cleaning and reordering