tweaked query to show only active categories and modified documentation