Mickael -- rewrote serialize.js file