make it working with python 3