Added maxit and random seed to the docs, code checks out - note tried
removing maxit and code slowed down by a factor of 5 so put it back in.