How a matchmaking algorithm saved lives