2 stacks improved