added an assert and fixed one of the returns in match() in example02.cc