Trying to make this run on python >= 2.5 instead of 2.7