prepare the layout