Development of functional hydrogels for controlled ion release