Improve adding of new patterns