created new version
use poll to implement the server