Functional for any number of processes