refactor page titles into method