solving patterns 2