add class template to code