server part written, rewriting the client