revise the template instantiation