change moves from a C array to a C++ vector