Send back to master results from processes
Split the runs in smaller functions to improve code readability