let stack_reset () = (* reinitialize to starting state *) Stack.clear stack; Stack.push !initial stack