Move stotalbin to a local variable, implement parfor