dedupe: replaced the code in the original method and included