Finished Server and client