Added the generation procedure.