handle formatted output