Changed printing to output to work with BST instead of LL