write functions to manipulate binary trees and print them nicely