replaced base64 dependencies with btoa