ch2 : tring to make createTree() func