print function added for bst