Change code to work for CPI