One of the techniques for the determination of the specific heat of solids and liquids use the Newton's law of cooling for the analysis of the experimental data instead of the usual calorimeter method. The success of this technique depends on the possibility in determining the temperatures of the system immediately before and after the internal heat transfer due to the immersion of the sample (whose specific heat one wants to measure) with small uncertainties in a container filled with hot water. In this paper a refinement of this technique is proposed using two curve fittings for the function that describes the law of cooling and small extrapolations to determine those temperatures, as well their uncertainties. This allows to determine not only the value of the specific heat, but also the uncertainty of this value by error propagation. The fitting of the function that describes the law of cooling (and not of polynomials) to the data allows the comparison of the parameters obtained from the experiment with those predicted by the theory, and there is good agreement. The application of this refinement to the determination of the specific heat of aluminium indicates that the procedure is good in spite of the use of low cost apparatus.