Working in python3, might be broken in python2