back to the original code
py3 fixes