first version of lmt_savevalues