parameterized version of template