integrated reverseStacks helper