added search by mask, header of PatternGenerator