add recurrsively get basic steps in a tree