Implementing parallel fitting.