frustrated attempt to port to python3; now singleton is broken