refine layouts