changes to volume_calc function