Added query results formatting