Implemented the max_2_sum method