add tree to lists function