A better volume function

Thanks @kwikadi :*