added function to insert stem

added function to insert stem