I don't know if my code works on Mathematica 11. Using ParallelTable uses all cores, code works faster.