insert, remove, and substitute for lm