add methods to fit the server-client model