if(ke.key_id==DIKI_A) *ac_distr=1;
   if(ke.key_id==DIKI_C) *ac_distr=2;
   if(ke.key_id==DIKI_B) *ac_distr=3;
+  if(ke.key_id==DIKI_X) *ac_distr=4;
  }
 
  return 1;
 
 {
  int fd,x,y,z;
  int count,offset;
- char file[16];
-
- if(ac_distr==1) strcpy(file,"a.plot");
- if(ac_distr==2) strcpy(file,"c.plot");
- if(ac_distr==3) strcpy(file,"b.plot");
+ char file[32];
+ int si_count;
+ 
+ si_count=d3_l->max_x*d3_l->max_y*SI_PER_VOLUME;
+ if(ac_distr==1) strcpy(file,"carbon_in_av.plot");
+ if(ac_distr==2) strcpy(file,"carbon_in_cv.plot");
+ if(ac_distr==3) strcpy(file,"carbon.plot");
+ if(ac_distr==4) strcpy(file,"amorphous_volumes.plot");
 
  if((fd=open(file,O_WRONLY|O_CREAT))<0)
  {
     if(ac_distr==2)
      if(!(*(d3_l->status+offset)&AMORPH)) count+=*(d3_l->extra+offset);
     if(ac_distr==3) count+=*(d3_l->extra+offset);
+    if(ac_distr==4)
+     if(*(d3_l->status+offset)&AMORPH) count+=1;
    }
   }
-  dprintf(fd,"%d %d\n",z,count);
+  if(ac_distr==4) dprintf(fd,"%d %d\n",z*CELL_LENGTH,count);
+  else dprintf(fd,"%d %f\n",z*CELL_LENGTH,100.0*count/si_count);
  }
  close(fd);