A multipurpose energy dispersive X-ray spectrometer for low, medium and high-Z materials analysis