Adding duplication checking.