Added compareVolumes function