working version of tictac