tested best_reordering, works now.