initial polling loop