generate buttons and output div