add update_client_model middleware