corrected calculation of vector index