Got lagrange to run but not work correctly