delete unnecessary attributes.