Removed duplicate function in pages.php