switched index from map to vector