refactoring page title to be more automated