pattern_eval for #6