removed setting next move in min-function