refactoring page title into helper method