add Init() function to vector.h and vector.cc