finish correcting the lagrangian function should be ready to run ein calculations now