Tree based routing