simplifies getQueryVariable