implemented most of game api