Implement recursive upclimbing to query root