layoutting the main pages