now generation is triggered by button