Added edit option to lm script