What affects the solubility of substances?