handle @Template annotation