new function in algorithm model, this is where matches will go