algorithm can now be re-started from a given generation, with just one extra argument