added root+leaf search