swap the results from other algorithm in the right order