add multiple sorted algorithm