updated to reduce time to sleep while polling