Writing polling part, need to add code.