add merge vector template function;