An Introduction to statistical mechanics and thermodynamics