altering send template function