Got it working with python3, currently broken in python2