reset and generate buttons working