In a lab we did in my chem class we were producing esters by reacting carboxylic acids with alcohols with a catalyst. After the reactants were mixed together and heated, we had to take the test tube with the chemicals in it and let them cool for a while. After that, we had to put the test tube in an ice bath for 5 minutes, take the test tube out, add a few mLs of distilled water, and smell the ester that was produced. What I want to know is why we had to cool the test tubes in an ice bath, and why we had to add distilled water. Any help will be appreciated.