tested for python2.6