tree prints out correctly