refactoring for page titles