update to using class template