updating stack