fixed the matchesWithArg function