cleaned up global volume code