Changes to generation functions