sync with util.js for base64