added support for multiple pages and content