added code to fetch results for non-filtered query