first fully working version of tictactoe - back end needs a lot of refactoring