implement getQuery function