pattern definition