improved output formatting
changed T append operator