solved problem with basis-vector indexing