finished implementing tree control