continue with recursive tree implementation