added functional generate number on click