handle query strings