broken state, but ported to python27