server code and client code