auto-run query if URL has params