Adding support to python 3 to helpers.py