Working version for Minimax parallelization