added loading of index and fixed bug in Vector.cpp