category sorting and pagination changes