updating the stack layout