move random seed to doBatch routine
fix return value of generator
add internal benchmarks

go test -test.bench=. -test.benchtime=5s -test.benchmem=true