Added comments to explain calculations for final result