added listener and poll