Change indx to val