matching_fn function

Match observations