added generate and reset buttons; ng hide and show