Mac_Lin Two step method optimization works