delete unnecessary "elements"