changed getIndexKey to addIndexKey