begin generation