starting to support both base64 and raw output