included update_pages function. Fixes in test setup.