deletion of default parameter arglist to avoid persistent data
moving tree printing function