get this working with python 3.x