added levenburg marquart method