use ptree for output