added support for csv download on a query