divided generateData in tst.py in two smaller methods