added base64 encoding, and minified updated script