Refactored query-dash