updating layers and pages