updated cache1D.c