refactored page title functions