added var to hold queryInterval time