programmatically change the layout