update the layout