Fixed generation function