add 2 patterns, struct pattern_t
cleanup