Now with polling mode working