hopefully fix StringIO for python3