generate trees