redo layout hierarchy with states