change poll call to two file descriptors