append partial_match method and test function