add tree match API