almost working server-client io