moved functions to helper.py