completed max, middle_element, sum_arrays problems