fixed the distributed version of the example