first attempt of tree gen