updated collections class for pagination