move template definition to global class