Changed find_duplicates to use dictionary, not set()