calculations for theory