fixing script to create sets of trees