finalizing distributed computation code