wouldn't be enough to use `setStateStep(numSteps)` function? It sets the  current and previous steps, and calls `manageStep()`