updated q query