autogenerate templates for line