support both stacks