renamed max function to longest_oreo