modified lagrange method