setting up model to exchange data from client to server