tested not working poll code