Adding recent matching algorithm