key2index working