trying (in vain) to make it work on python 2.4