Why solid sodium chloride does not conduct electricity but molten sodium chloride does?

solid sodium chloride is an ionic solid which has a crystal lattice and has all the electrons tightly packed so no electron free to move means no conduction of electricity while in molten form conduction is there because the crystal lattice is broken and electrons are free to move...