making this python 2.6 friendly