first working version of tic-tac-toe