implement create tree randomly