Improve adding new patterns