rewriting addAttr / setAttr - functionality