update lattcorr script