changed to stack.add