workings on stacks