pass vec by reference in vector_to_string()