functional game, with some bugs