more hacking and thinking in python