Adding an index for the sample