improve check duplication