Uses a sorting of the final lists rather than a merge; adds arguments for testing.