updated the call to isUnique in the reg method