Update generation.js

Not working properly at the moment