added template.cpp