added in a helper function for retriving pages