added C++ template