use vector indexing