revisions to vec.cpp