querySpecialPage and associated functions