calculations and documentation