got query to work finally!