tree lookup working