move element's attributes into element.attributes