implemented tuple/list form for tree data structure