record a pattern