so reservations_sorted_by_wait_time is just the last wait time? the name makes me think otherwise. maybe make reservations_sorted_by_wait_time the sorted array, then on line 17 call reservations_sorted_by_wait_time.last