added new version of matching