changed format_output(...) to remove unnecessary quotation marks