cleaning and reordering methods