implement vector_resize