an exercise about stacks