moved code to draw tree info text to separate function