several changes to template