Changed getPageName Function to include full name