find duplicates func

#393