learning patterns 1