made alternating rows and sorting in all categories