comp_tree: node creation and insetion modified to match specification