main layout change,
save states for re-enterring