add general tree constructing template in comment