preparing the layout