Edit previousPatterns and nextPatterns;