added tree(), nears()