better queries printing