addedd new search and duplicate handling methods