Evolution of a metabolism