Calculating CPI- Assignment