modified RandomNumberGeneratorService in patTuple_mini.py