update to pattern matcher