Setting up processes and modifying trans_closure function