added random sampling search for trees