added PatternView class