add duplication check