adding template to in table insertion mode