Inserting Templates to Sequences