mutual match algorithm working