 The point of the ester group is controlled by choosing a azo dye with a different alcohol group position.Either the dye or the sugar is reacted with succinic anhydride.This forms an amide group with the sugar or an ester group with the dye.