new template

broken. tried to add on-the-fly checking. Must not have done it
correctly