second commit, compatible with pre-python2.6