converted to python 3.2