KD: Use _format_query to format query