minor modifications in print_tree_bf