Understanding the effects of compositional changes in ion exchange