fix another bug:
long int *data = malloc(loops * sizeof(long int));