Dynamics and Thermodynamics of systems with long range interactions