Simplify duplicates utility method