refactoring static pages, changing reg func