added setAttr and getAttr methods