implementation finished; some error in trees generation;