modified remove_element.