update the stack