refactoring for TicTacToe sdk