change the layout to flexible