Prototype for generate