modified printTree method to use printData instead of calling data description