added base64 encoding