update buttons and pages