A study of hydrated mercury and cadmium fluorides