simple socket server that almost works