Adding logic to group pages by first letter