reformat the layout.