using merge algo to merge large amount of url