most of the way through implementing the distributed C