rewrite server, create clients