finished coding the client and server part without encryption