Added user-specified sampling of generations.