Change submit to generate