added nonblocking poll