matching function / won or lost / mostly working