updating the stack