corrected js for polling