reverted to Python2.4 compatibility