can now read in and run on arbitrary trees