reorder tables