extracted getQueryVariable method into own js file