using a dynamic query to fetch requests