modify duplication check