working version of pages structure