Working version of LSM.