added base64 mode