Variational Integrator