get query string and print