adding a method to set output in the resultquerywriter class