modified njoin to terminate after all processes will complete