fixed bug #10
added template_type