stacks using array of items