updated menu code; updated PatternProcessor