added guards to distributor map, example now working, but there may be more data races