Added matchedAttributes util with tests