improvements to minimax