first version of server and client