now it can wait for new connections, of course there must be other bugs