Updated for gen.js