feat: add dedupe function