diff --git a/collect_data.sh b/collect_data.sh
index 452e8b4072de714f990670ea4cb8b66b1bc2159d..f266f16995447fe727f2f10ef61fe6ce2e65a695 100755
--- a/collect_data.sh
+++ b/collect_data.sh
@@ -4,6 +4,8 @@ LOG=data_$(date +%F_%T).log
 PERF=./perforate.sh
 INFO=./build/info2
 
+BARVINOK=../barvinok/iscc
+
 get_scop() {
     $PERF -e "$1"
 }
@@ -29,14 +31,13 @@ perforate() {
 }
 
 compile() {
-    gcc -s -O3 -I../polybench-c-4.2.1-beta/utilities -I. -DPOLYBENCH_TIME  -o "$2" ../polybench-c-4.2.1-beta/utilities/polybench.c "$1" -lm "$3"
+    gcc -s -O3 -I../polybench-c-4.2.1-beta/utilities -I. -DPOLYBENCH_TIME  -o "$2" ../polybench-c-4.2.1-beta/utilities/polybench.c "$1" -lm "$3" -fopenmp
 }
 
-correlation() {
-    target=codes/correlation/correlation
+barvinok() {
+    echo "P := parse_file \"${1}\"; card P[0]; " | $BARVINOK -I. -I ../polybench-c-4.2.1-beta/utilities --no-pet-autodetect --polynomial-approximation -DPOLYBENCH_USE_SCALAR_LB|tail -n1|sed "s/[{} ]//g"
+}
 
-    # accurate baseline
-    # FIXME: baseline is currently without pluto, we need also accurate+pluto
 baseline() {
     output="$(dirname ${target})/$(basename ${target})"
     type=baseline
@@ -48,6 +49,8 @@ baseline() {
     fi
     compile "${output}_baseline.c" "${output}" "codes/${code}/data.o"
     printf "${code},${type},,," >> ${LOG}
+
+    printf "$(barvinok "${target}.c")," >> ${LOG}
     ./${output} >> ${LOG}
 }
 
@@ -55,121 +58,45 @@ permute() {
     get_scop "${target}.c" "${target}_perf.c"
     get_info "${target}.c.openscop" | \
     while read x y; do
-        # pluto
         output="$(dirname ${target})/${x}_${y}_$(basename ${target})"
-        perforate "${target}.c" "${output}.c" "$x" "$y"
-        echo compile "${output}.c" "${output}"
-        compile "${output}.c" "${output}" "codes/${code}/data.o"
-        printf "${code},perfpluto,%s,%s," "${x}" "${y}" >> ${LOG}
-        ./${output} >> ${LOG}
+
         # no pluto
         perforate --nopluto "${target}.c" "${output}.c" "$x" "$y"
         echo compile "${output}.c" "${output}"
         compile "${output}.c" "${output}" "codes/${code}/data.o"
         printf "${code},perf,%s,%s," "${x}" "${y}" >> ${LOG}
-        ./${output} >> ${LOG}
-    done
-}
-
-correlation() {
-    code=correlation
-    target="codes/${code}/${code}"
-
-    baseline
-    baseline --pluto
-
-    permute
-}
-
-jacobi_2d() {
-    code=jacobi-2d
-    target="codes/${code}/${code}"
-
-    baseline
-    baseline --pluto
-
-    permute
-}
-
-deriche() {
-    code=deriche
-    target="codes/${code}/${code}"
-
-    baseline
-    baseline --pluto
-
-    permute
-}
-
-floyd_warshall() {
-    code=floyd-warshall
-    target="codes/${code}/${code}"
-
-    baseline
-    baseline --pluto
-
-    permute
-}
-
-doitgen() {
-    code=doitgen
-    target="codes/${code}/${code}"
-
-    baseline
-    baseline --pluto
-
-    permute
-}
-
-seidel_2d() {
-    code=seidel-2d
-    target="codes/${code}/${code}"
 
-    baseline
-    baseline --pluto
-
-    permute
-}
-
-fdtd_2d() {
-    code=fdtd-2d
-    target="codes/${code}/${code}"
-
-    baseline
-    baseline --pluto
+        COUNT=$(barvinok "${output}.c")
+        printf "${COUNT}," >> ${LOG}
+        ./${output} >> ${LOG}
 
-    permute
+        # pluto
+        perforate "${target}.c" "${output}.c" "$x" "$y"
+        echo compile "${output}.c" "${output}"
+        compile "${output}.c" "${output}" "codes/${code}/data.o"
+        printf "${code},perfpluto,%s,%s," "${x}" "${y}" >> ${LOG}
+        printf "${COUNT}," >> ${LOG}
+        ./${output} >> ${LOG}
+    done
 }
 
-adi() {
-    code=adi
-    target="codes/${code}/${code}"
-
-    baseline
-    baseline --pluto
 
-    permute
-}
+#for code in trmm syrk syr2k symm gesummv gemver gemm correlation covariance jacobi_2d deriche floyd_warshall doitgen seidel_2d fdtd_2d adi heat_3d jacobi_1d hotspot; do
+# remove adi
+#for code in trmm syrk syr2k symm gesummv gemver gemm correlation covariance jacobi_2d deriche floyd_warshall doitgen seidel_2d fdtd_2d heat_3d jacobi_1d hotspot; do
 
-heat_3d() {
-    code=heat-3d
+#for code 2mm 3mm adi correlation covariance deriche doitgen fdtd-2d floyd-warshall gemm gemver gesummv heat-3d hotspot jacobi-1d jacobi-2d seidel-2d symm syr2k syrk trmm
+# removed adi
+for code in 2mm 3mm correlation covariance deriche doitgen fdtd-2d floyd-warshall gemm gemver gesummv heat-3d hotspot jacobi-1d jacobi-2d seidel-2d symm syr2k syrk trmm; do
     target="codes/${code}/${code}"
 
     baseline
     baseline --pluto
 
     permute
-}
-
-jacobi_1d() {
-    code=jacobi-1d
-    target="codes/${code}/${code}"
+done
 
-    baseline
-    baseline --pluto
-
-    permute
-}
+exit 
 
 
 hotspot() {
@@ -193,14 +120,3 @@ hotspot() {
     done
 }
 
-correlation
-deriche
-floyd_warshall
-doitgen
-seidel_2d
-fdtd_2d
-adi
-heat_3d
-jacobi_2d
-jacobi_1d
-#hotspot