reworking server-client protocol