Added LM algorithm