applying layouts to all the pages