proof reading: stopped at search and match section