Added selectedTree method