negamax seems to work now, maybe slower than before though...