passed middle_element method