update gen2.js