now works with python 3