add two stacks being managed by a single array