improved output formatting