After the pods are harvested, the cocoa beans and pulp are removed from the shell and fermented, either in wooden boxes or in a wrapping of banana leaves. Fermentation takes an average of five days. During the first days of fermentation, the temperature of the beans rises significantly, killing the live bean and preventing germination. The primary function of fermenting cocoa beans is to produce the flavor precursors that allow the development of the chocolate flavor produced when the beans are roasted.