Updating this to work in Python 2.6 instead of >=2.7