move stats creation to main.py