finished untested nonblocking server