add mk_vector to template.cpp