initial impl.  minimax not quite right