added checkUnique method