polling now works though a bit buggy