fininsh Distribute algorithm