Move reordering to function for later