Script will now run on both Python 3.x and 2.x