tree Ancestor finder with recursion