return exported format as BytesIO() instead of str()
updated example to reflect the new result dict()