updated version of the tic tac toe JS