used request->getQuery instead of query