doLM function

doLM