add tree demo and update its api docs