insert working in tree