revert hasAttribute function