started implementing min number of periods stat functions in utils.py