updated 'index' definition and comment