refactored volume computation functions into precomputation module