first version of a general tree interface