updated example with base64 encoding