reimplemetation of games (matching)