prepare layout