base64 conversion; example of javascript map; example of indexOf