if (!attributes[attrName]) {
                attributes[attrName] = [attrValue];
            } else {
                attributes[attrName].push(attrValue);
            }