What is the purpose of the mitochondria in both plant and animal cells?