matchmaker algorithm working