working on polling, WARNING: work in progress