added insert_r, insert_l, subst