Hydrogels for controlled drug delivery