added some code to CPI based inflation adjustment