restructured database and pages