Added pattern length to model and UI