Add checkDuplicate and group scope