refine layout.