Adding duplication check