Recognizes 3-4 patterns
use layout in matrixDialog