polling now working and writing events to queue