modify Find to match keyvaluepair
add some comments