changed polldatatask to thread