added in generate button and mouse click, doesn't work yet