is this correct to have a unique index here?