server code reponds to client