working on replacing duplicates