added functionality for pageName