updated CPA calculation