obtained an excellent increase in speed by adding two @parallel calls to inner for loops